package com.thirteengroup.casemg.service.impl;

import com.thirteengroup.casemg.domain.PageResult;
import com.thirteengroup.casemg.domain.customer;
import com.thirteengroup.casemg.domain.queryObject;
import com.thirteengroup.casemg.domain.statisticsQuery;
import com.thirteengroup.casemg.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class customerService implements ICustomerService {

    @Autowired
    com.thirteengroup.casemg.Mapper.customerMapper customerMapper;
    @Override
    public List<customer> queryCustomer(queryObject queryObject) {
        int count= customerMapper.selectCount(queryObject);
        List<customer> customers = customerMapper.selectAll(queryObject);


        return customers;
    }

    @Override
    public Integer selectCount(queryObject queryObject) {
        return customerMapper.selectCount(queryObject);
    }

    @Override
    public void updateOne(customer customer) {
        customerMapper.updateOneByid(customer);
    }

    @Override
    public void insertOne(customer customer) {
        customerMapper.insertOne(customer);
    }

    @Override
    public void deleteByid(Long id) {
        customerMapper.deleteByid(id);
    }

    @Override
    public List<statisticsQuery> statisticsInputUser(queryObject queryObject) {
        return customerMapper.statisticsInputUser(queryObject);
    }

    @Override
    public List<statisticsQuery> statisticsTime(queryObject queryObject) {
        return customerMapper.statisticsTime(queryObject);
    }

    @Override
    public void updateInputUser(Long inputUserId, Long id) {
        customerMapper.updateInputUser(inputUserId,id);
    }
}
